import { getbusiness } from '@/apis/jackbo/apicomm'
import { Promise } from 'core-js'
export const duduxia = new Promise(function(resolve) {
  // console.log('Promise');
  const params = {
    page: 1,
    size: 10
  }
  let arr = []
  getbusiness(params).then(res => {
    arr = res.data.records
    arr.forEach(element => {
      element.label = element.businessName
      element.value = element.id
    })
    if (res.code == 0) {
      resolve(res.data.records)
    }
  })
})
//   duduxia.then(function(arr) {
//     // fromdata[1].optionsdata=arr
//   });
